#include <QtGui/QApplication>
#include <QDesktopWidget>
#include "mainwindow.h"

void center(QWidget* widget)
{
    QDesktopWidget* desktop = QApplication::desktop();
    int x = (desktop->width() - WIDTH) / 2;
    int y = (desktop->height() - HEIGHT) / 2;

    widget->move(x, y);
}

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);
    MainWindow* window = new MainWindow;
    center(window);
    window->show();

    return app.exec();
}
